package com.example.consumeexample.config;

import com.example.common.QueueConsts;
import org.springframework.amqp.core.Queue;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;

/**
 * Rabbitmq配置.
 *
 * @author Luo
 * @version 3.7.0
 * @date 2021/6/24 19:19
 **/
@SpringBootConfiguration
public class RabbitmqConfig {

    /**
     * 配置一个工作模型队列.
     *
     * @return Queue
     */
    @Bean
    public Queue userQueue() {
        return new Queue(QueueConsts.USER_QUEUE_NAME);
    }

}

